#include<iostream>
#include<cmath>
#include<algorithm>
using namespace std;

const int N=1010;
struct node{
	double l, r;
}arr[N];

bool cmp(node& x, node& y)
{
	return x.l<y.l;
}
int main()
{
	int n, d, cnt=1;
	while(cin>>n>>d, n&&d)
	{
		bool sign=false;
		for(int i=1; i<=n; i++)
		{
			int x, y; cin>>x>>y;
			if(y>d) sign=true;
			double gap= sqrt(d*d-y*y);
			arr[i].l=x-gap;
			arr[i].r=x+gap;
		}
		printf("Case %d: ", cnt);
		if(sign) cout<<-1<<endl;
		else
		{
			sort(arr+1, arr+1+n, cmp);
			double ret=1, r=arr[1].r;
			for(int i=2; i<=n; i++)
			{
				double left=arr[i].l, right=arr[i].r;
				if(left > r) 
				{
					ret++;
					r=right;	
				} 
				else
				{
					r=min(r, right);
				}
			}
			cout<<ret<<endl;
		}
		cnt++;
	}
	return 0;
}
